import request from '@/util/request'

// 更新文章详情
export const putMyArticleInfo = (data) => request.put('/my/article/info', data)

// 发布文章
export const myArticleAdd = (data) => request.post('/my/article/add', data)

// 获取文章详情
export const getMyArticleInfo = (id) =>
  request.get('/my/article/info', { params: { id } })

// 删除文章
export const deleteMyArticleInfo = (id) =>
  request.delete('/my/article/info', { params: { id } })

// 获取文章列表
export const myArticleList = (data) =>
  request.get('/my/article/list', { params: { ...data } })
